Seizures are named for their unpredictability. This project seeks to understand the conditions that lead to seizure initiation so that we can develop anticonvulsant strategies to ameliorate those conditions. Organotypic hippocampal slice cultures first develop interictal spikes and then spontaneous seizures over 3 - 7 days in vitro (DIV). The question addressed here is: why does a seizure occur instead of another interictal spike? Answering this requires a careful dissection of the conditions just prior to each spike, and each seizure. That is not feasible to do even in vitro, whereas in computer models, pre-ictal conditions can be stored, analyzed, manipulated, and re-run. In the last round, we developed the first neural network model that generates both interictal spikes and seizures. The seizures are self-sustaining reentrant waves of activity that have recently been recorded with high-density electrodes in human epilepsy. The conditions for sustained re-entry are difficult to achieve, which may account for the relative rarity of seizures vs. interictal spikes. In this proposal, we will test three pre-ictal conditions that we have identified in silico. The first condition is the wiring of the network. Neuronal synaptic wiring strategies are largely unknown, but we have developed technologies to determine synaptic wiring in the organotypic slice, including a microcscope within an incubator (?IncuScope?) and deployment of digital micromirror chips to stimulate single neurons using optogenetics (?optical synapses?). We will read out the synaptic targets of the stimulated neurons using sensitive new transgenic calcium fluorophores. We will then test the necessity of that ictal wiring pattern by altering it using excitatory and inhibitory optical synapses. The second pre-ictal condition is the pattern of refractoriness in the network. These patterns shape the wave of activation, and most waves die out without forming stable re- entrant cycles. The third preictal condition is the location of the onset of the wave of activation; reentrant waves of activity can only be initiated from particular regions within a pre-ictal network pattern of refractoriness. We will test the second and third conditions by converting spiking networks to seizing networks, and seizing networks to spiking or quiescent networks, with appropriate stimulation using excitatory optical synapses. These experiments will provide unique new insights into brain connectomics; ictogenesis; and the mechanisms of efficacy and failure of the therapies for medically intractable epilepsy: seizure surgery (changing network wiring; Aim 1) and brain stimulation (changing the refractory patterns in epileptic networks; Aim 2).